factor theorem with 2 unknowns